package com.charactereducation.serviceproviderusercenter.service;

import com.charactereducation.module.vo.ApiCofig;
import com.charactereducation.tools.myRunTime.MyRunTimeExcption;

import java.util.List;
import java.util.Map;

/**
 * Created by Baggio on 2019-2-18.
 */
public interface ApiCofigService {
    /**
     * 更新API配置调用方信息
     * @param apiCofig
     * @throws MyRunTimeExcption
     */
    void modifyApiCofig(ApiCofig apiCofig)throws MyRunTimeExcption;

    /**
     * 获取API调用方信息
     * @param map
     * @return
     * @throws MyRunTimeExcption
     */
    ApiCofig getApiCofig(Map<String, String> map)throws MyRunTimeExcption;

    /**
     * 获取PI调用方信息列表
     * @param map
     * @return
     * @throws MyRunTimeExcption
     */
    List<ApiCofig> getApiCofigList(Map<String, String> map)throws MyRunTimeExcption;
    /**
     * 检查API调用者合法性
     * @param channelId
     * @param timestamp
     * @param sign SIGN=md5(channelId+channeleScret+timestamp)
     * @throws MyRunTimeExcption
     */
    void checkAPI(String channelId, String timestamp, String sign)throws MyRunTimeExcption;

}
